@import '../../style/themes/index';
@import '../../style/mixins/index';

@form-base-prefix-cls: ~'@{ant-prefix}-form';
@form-prefix-cls: ~'@{form-base-prefix-cls}-pro';

.@{form-prefix-cls} {
  & .@{ant-prefix}-row {
    width: 100%;
  }

  & .ant-affix {
    background: #fff;
    box-shadow: 0 -1px 4px 0 rgba(0, 21, 41, 0.12);
  }

  & .ant-card {
    margin-bottom: 24px;
  }

  & .ant-card-body {
    & .ant-col:last-child .ant-form-item {
      margin-bottom: 0;
    }
  }

  & .pcr-app .pcr-interaction input {
    line-height: 18px;
  }

  & .pcr-app[data-theme=monolith] .pcr-selection .pcr-color-palette {
    height: 4em;
  }

  &-help {
    margin-right: 8px;
  }

  &-suffix {
    display: inline-block;
    padding-left: 6px;
    color: @text-color;
  }

  & .@{form-base-prefix-cls}-item-control-wrapper {
    width: 100%;

    .ant-calendar-picker {
      width: 100%;
    }
  }

  // NOTE [fix] 横着的时候上下对不齐
  & .ant-affix {
    height: auto !important;
    .@{form-prefix-cls}-item-action {
      padding: 16px;
    }
  }

  .@{form-prefix-cls}-item {
    margin-bottom: 20px !important;

    &-label label::after {
      margin: 0 6px 0 2px;
    }

    &-with-help {
      margin-bottom: 0;
    }

    &-suffix {
      & .@{form-base-prefix-cls}-item-children {
        display: flex;
        align-items: center;
      }
    }

    &-diy {
      & .@{form-base-prefix-cls}-item-control {
        line-height: inherit;
      }
      & .@{form-base-prefix-cls}-item-children {
        display: flex;
        height: 40px;
        align-items: center;
      }

      & .@{ant-prefix}-tag-group-create,
      & .@{ant-prefix}-tag-group-create-input,
      & .@{ant-prefix}-tag-group-create-input-only {
        margin: 0;
      }

      & .pcr-app[data-theme=monolith] {
        box-sizing: border-box;
      }
    }
  }

  .@{form-prefix-cls}-explain {
    font-size: 14px;
  }

  &--compact {
    .@{form-base-prefix-cls}-item {
      margin-bottom: 8px !important;
      width: calc(100% - 16px);
    }
    .@{form-prefix-cls}-item-action {
      margin-bottom: 8px !important;
      line-height: inherit;
    }
  }
}
